package com.milk.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.milk.system.model.entity.Merchants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 商家信息表 Mapper 接口
 *
 * @author milk
 * @since 2024-05-02
 */

@Mapper
public interface MerchantsMapper extends BaseMapper<Merchants> {

    @Select("SELECT * from le_merchants WHERE merchant_name = #{merchantName} limit 1")
    Merchants getMerchantsName(@Param("merchantName") String merchantName);

    @Select("SELECT * from le_merchants WHERE id = #{id} limit 1")
    Merchants getMerchantsId(@Param("id") Long id);

}
